<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/dojo.js"></script>
</head>
<body>
<button id="click">Click</button>
<div id="grid"></div>
<script type="text/javascript">
    dojo.require("dojo.request");
</script>
<script type="text/javascript">
    require([ "dojo/request", "dojo/dom", "dojo/dom-construct",
        "dojo/json", "dojo/on", "dojo/domReady!" ], function (request, dom, domConstruct, json, on) {
        on(dom.byId("click"), "click", function () {
            request("home.json").then(
                    function (data) {
                        var jsonData = json.parse(data, true);
                        domConstruct.place("<p>Org: <code>" + jsonData.name
                                + "</code><p/>", "grid");
                        domConstruct.place("<p>Person: <code>" + jsonData.person.name
                                + "</code><p/>", "grid");
                        domConstruct.place("<p>Org: <code>" + data
                                + "</code><p/>", "grid");
                    }, function (err) {
                        // handle an error condition
                    }, function (evt) {
                    });
        });
    });
</script>
</body>
</html>